import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginView from "@/views/LoginView.vue";
import EnrollView from "@/views/EnrollView.vue";
import msgEnroll from "@/components/enroll/subassembly/person/MsgEnroll.vue";
import mailEnroll from "@/components/enroll/subassembly/person/MailEnroll.vue";
import cmailEnroll from "@/components/enroll/subassembly/company/CmailEnroll.vue";
import cmsgEnroll from "@/components/enroll/subassembly/company/CmsgEnroll.vue";
import sucessEnroll from "@/components/enroll/subassembly/person/SucessEnroll.vue";
import csuccessEnroll from "@/components/enroll/subassembly/company/CsuccessEnroll.vue";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/login'
  },
  {
    path: '/login',
    name:'login',
    component: LoginView,
  },
  {
    path:'/enrollview',
    name:'enrollview',
    component:EnrollView,
    children:[
      {
        path: '',
        components: {msg:mailEnroll}
      },
      {
        path: 'mail',
        components: {msg:mailEnroll}
      },
      {
        path:'msg',
        components:{msg:msgEnroll}
      },
      {
        path: 'succ',
        components: {msg:sucessEnroll}
      },
      {
        path: 'cmail',
        components: {msg:cmailEnroll}
      },
      {
        path:'cmsg',
        components: {msg:cmsgEnroll}
      },
      {
        path:'csucc',
        components: {msg:csuccessEnroll}
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
